package xjtu.zd.server.book.detail.impl;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import xjtu.zd.server.book.detail.Detail;
import xjtu.zd.server.book.detail.DetailService;
import xjtu.zd.server.book.detail.ScoDto;
import xjtu.zd.server.book.detail.dao.DetailDao;
import xjtu.zd.server.common.CurrentUser;

import javax.annotation.Resource;

@Service //这是受spring容器管理的业务组件（Bean）
@Transactional //说明本类说有的方法都是事务性的
public class DetailServiceImpl implements DetailService {

    @Resource
    private DetailDao detailDao;

    @Override
    public Detail getInfo(int b_id) {
        return detailDao.getInfo(b_id);
    }

    @Override
    public void setScore(ScoDto dto) {
        detailDao.setScore(dto);
    }

    @Override
    public float getScore(String b_id) {
        return detailDao.getScore(b_id);
    }


}
